CREATE TABLE [dbo].[TTSUBR_GAST]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_TIPO_GAST] [dbo].[TD_VC_003] NOT NULL,
[CO_RUBR_GAST] [dbo].[TD_VC_003] NOT NULL,
[CO_SUBR_GAST] [dbo].[TD_VC_003] NOT NULL,
[DE_SUBR_GAST] [dbo].[TD_VC_100] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTSUBR_GA__CO_US__23E931E9] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTSUBR_GA__FE_US__24DD5622] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTSUBR_GA__CO_US__25D17A5B] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTSUBR_GA__FE_US__26C59E94] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTSUBR_GAST] ADD CONSTRAINT [PK__TTSUBR_G__827B631B0D45C3B3] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_TIPO_GAST], [CO_RUBR_GAST], [CO_SUBR_GAST]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTSUBR_GAST] ADD CONSTRAINT [FK__TTSUBR_GAST__700A6687] FOREIGN KEY ([CO_EMPR], [CO_TIPO_GAST], [CO_RUBR_GAST]) REFERENCES [dbo].[TTRUBR_GAST] ([CO_EMPR], [CO_TIPO_GAST], [CO_RUBR_GAST])
GO
